com.northgateis.reality.realsql
Class RealSQLResultSetMetaData

java.lang.Object
  |
  +--com.northgateis.reality.realsql.RealSQLResultSetMetaData

public class RealSQLResultSetMetaData
extends java.lang.Object
implements java.sql.ResultSetMetaData

The RealSQLResultSetMetaData class is an implementation of the JDBC 2.0 ResultSetMetaData interface.


Constructor Summary
RealSQLResultSetMetaData(RealSQLStatement stmt, java.lang.String sql, int traceFlags)
          Constructs a new ResultSetMetaData instance.
 
Method Summary
protected  int getAccessPlan()
          Retrieve the server AccessPlan for this prepared statement.
 java.lang.String getCatalogName(int column)
          Retrieve the column's table catalog name.
 java.lang.String getColumnClassName(int column)
          Not supported by the RealSQL-JDBC driver.
 int getColumnCount()
          Retrieve the number of columns in this ResultSet.
 int getColumnDisplaySize(int column)
          Retrieve the column's normal max width in chars.
 java.lang.String getColumnLabel(int column)
          Retrieve the suggested column label for use in printouts and displays.
 java.lang.String getColumnName(int column)
          Retrieve the column's name.
 int getColumnType(int column)
          Retrieve the column's SQL type.
 java.lang.String getColumnTypeName(int column)
          Retrieve the column's database-specific type name.
protected  int getParamCount()
          Retrieve the parameter count for this prepared statement.
 int getPrecision(int column)
          Retrieve the column's number of decimal digits.
 int getScale(int column)
          Retrieve the column's number of digits to right of the decimal point.
 java.lang.String getSchemaName(int column)
          Retrieve the column's table's schema.
 java.lang.String getTableName(int column)
          Retrieve the column's table name.
 boolean isAutoIncrement(int column)
          Indicates whether the column is automatically numbered, thus read-only.
 boolean isCaseSensitive(int column)
          Indicates whether a column's case matters.
 boolean isCurrency(int column)
          Indicates whether the column is a cash value.
 boolean isDefinitelyWritable(int column)
          Indicates whether a write on the column will definitely succeed.
 int isNullable(int column)
          Indicates the nullability of values in the designated column.
 boolean isReadOnly(int column)
          Indicates whether a column is definitely not writable.
 boolean isSearchable(int column)
          Indicates whether the column can be used in a where clause.
 boolean isSigned(int column)
          Indicates whether values in the column are signed numbers.
 boolean isWritable(int column)
          Indicates whether it is possible for a write on the column to succeed.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

RealSQLResultSetMetaData

public RealSQLResultSetMetaData(RealSQLStatement stmt,
                                java.lang.String sql,
                                int traceFlags)
                         throws java.sql.SQLException
Constructs a new ResultSetMetaData instance.

Forwards the SQL statement to the Reality SQL server, the server prepares the statement (for subsequent execution) and returns the ResultSet METADATA.

Parameters:
stmt - the controlling Statement object.
sql - the SQL statement to be prepared.
logLevel - the type of events that to be logged
Method Detail

getCatalogName

public java.lang.String getCatalogName(int column)
                                throws java.sql.SQLException
Retrieve the column's table catalog name.

Specified by:
getCatalogName in interface java.sql.ResultSetMetaData
Parameters:
column - the index of the desired column.
Returns:
the catalog name for the requested column
Throws:
java.sql.SQLException - never thrown.

getColumnClassName

public java.lang.String getColumnClassName(int column)
                                    throws java.sql.SQLException
Not supported by the RealSQL-JDBC driver.

JDBC 2.0 Returns the fully-qualified name of the Java class whose instances are manufactured if the method ResultSet.getObject is called to retrieve a value from the column.

Specified by:
getColumnClassName in interface java.sql.ResultSetMetaData
Parameters:
column - the index of the desired column.
Returns:
the fully qualified Java class name for the column map
Throws:
java.sql.SQLException - IM001 - "Driver does not support this function".

getColumnCount

public int getColumnCount()
                   throws java.sql.SQLException
Retrieve the number of columns in this ResultSet.

Specified by:
getColumnCount in interface java.sql.ResultSetMetaData
Returns:
the number of columns in the result set.
Throws:
java.sql.SQLException - never thrown.

getColumnDisplaySize

public int getColumnDisplaySize(int column)
                         throws java.sql.SQLException
Retrieve the column's normal max width in chars.

Specified by:
getColumnDisplaySize in interface java.sql.ResultSetMetaData
Parameters:
column - the column index being queried.
Returns:
the display size of the column.
Throws:
java.sql.SQLException - never thrown.

getColumnLabel

public java.lang.String getColumnLabel(int column)
                                throws java.sql.SQLException
Retrieve the suggested column label for use in printouts and displays.

Specified by:
getColumnLabel in interface java.sql.ResultSetMetaData
Parameters:
column - the column index being queried.
Returns:
the column label.
Throws:
java.sql.SQLException - never thrown.

getColumnName

public java.lang.String getColumnName(int column)
                               throws java.sql.SQLException
Retrieve the column's name.

Specified by:
getColumnName in interface java.sql.ResultSetMetaData
Parameters:
column - the desired column index.
Returns:
the name of the specified column.
Throws:
java.sql.SQLException - never thrown.

getColumnType

public int getColumnType(int column)
                  throws java.sql.SQLException
Retrieve the column's SQL type.

Specified by:
getColumnType in interface java.sql.ResultSetMetaData
Parameters:
column - the index of the desired column.
Returns:
the type from java.sql.Types of this column.
Throws:
java.sql.SQLException - never thrown.

getColumnTypeName

public java.lang.String getColumnTypeName(int column)
                                   throws java.sql.SQLException
Retrieve the column's database-specific type name.

Specified by:
getColumnTypeName in interface java.sql.ResultSetMetaData
Parameters:
column - the column index of the desired column
Returns:
the type name for the SQL type of the specified column
Throws:
java.sql.SQLException - never thrown.

getPrecision

public int getPrecision(int column)
                 throws java.sql.SQLException
Retrieve the column's number of decimal digits.

Specified by:
getPrecision in interface java.sql.ResultSetMetaData
Parameters:
the - column index whose precision is desired
Returns:
the precision of this column.
Throws:
java.sql.SQLException - never thrown.

getScale

public int getScale(int column)
             throws java.sql.SQLException
Retrieve the column's number of digits to right of the decimal point.

Specified by:
getScale in interface java.sql.ResultSetMetaData
Parameters:
the - column index whose scale is desired.
Returns:
the scale of this column
Throws:
java.sql.SQLException - never thrown.

getSchemaName

public java.lang.String getSchemaName(int column)
                               throws java.sql.SQLException
Retrieve the column's table's schema.

Specified by:
getSchemaName in interface java.sql.ResultSetMetaData
Parameters:
column - the desired column index.
Returns:
schema name.
Throws:
java.sql.SQLException - never thrown.

getTableName

public java.lang.String getTableName(int column)
                              throws java.sql.SQLException
Retrieve the column's table name.

Specified by:
getTableName in interface java.sql.ResultSetMetaData
Parameters:
column - the desired column index.
Returns:
the name of the table from which this column was drawn
Throws:
java.sql.SQLException - never thrown.

isAutoIncrement

public boolean isAutoIncrement(int column)
                        throws java.sql.SQLException
Indicates whether the column is automatically numbered, thus read-only.

Specified by:
isAutoIncrement in interface java.sql.ResultSetMetaData
Parameters:
column - the column index being checked
Returns:
true if the column will automatically increment on insert; else false.
Throws:
java.sql.SQLException - never thrown.

isCaseSensitive

public boolean isCaseSensitive(int column)
                        throws java.sql.SQLException
Indicates whether a column's case matters.

Specified by:
isCaseSensitive in interface java.sql.ResultSetMetaData
Parameters:
column - the column index being queried.
Returns:
the RealSQL-JDBC driver always returns true.
Throws:
java.sql.SQLException - never thrown.

isCurrency

public boolean isCurrency(int column)
                   throws java.sql.SQLException
Indicates whether the column is a cash value.

Specified by:
isCurrency in interface java.sql.ResultSetMetaData
Parameters:
column - the column index being queried.
Returns:
true if the column is a cash value; else false.
Throws:
java.sql.SQLException - never thrown.

isDefinitelyWritable

public boolean isDefinitelyWritable(int column)
                             throws java.sql.SQLException
Indicates whether a write on the column will definitely succeed.

Specified by:
isDefinitelyWritable in interface java.sql.ResultSetMetaData
Parameters:
column - the column index being queried.
Returns:
true if the column is definately writable; else false
Throws:
java.sql.SQLException - this is never thrown

isNullable

public int isNullable(int column)
               throws java.sql.SQLException
Indicates the nullability of values in the designated column.

Specified by:
isNullable in interface java.sql.ResultSetMetaData
Parameters:
column - the column index being checked.
Returns:
true if the specified column can be nullified; else false
Throws:
java.sql.SQLException - never thrown.

isReadOnly

public boolean isReadOnly(int column)
                   throws java.sql.SQLException
Indicates whether a column is definitely not writable.

Specified by:
isReadOnly in interface java.sql.ResultSetMetaData
Parameters:
column - the column index being queried.
Returns:
true if the column is read-only; else false.
Throws:
java.sql.SQLException - never thrown.

isSearchable

public boolean isSearchable(int column)
                     throws java.sql.SQLException
Indicates whether the column can be used in a where clause.

Specified by:
isSearchable in interface java.sql.ResultSetMetaData
Parameters:
column - the column index to be queried.
Returns:
true if the column can be used; else false.
Throws:
java.sql.SQLException - never thrown.

isSigned

public boolean isSigned(int column)
                 throws java.sql.SQLException
Indicates whether values in the column are signed numbers.

Specified by:
isSigned in interface java.sql.ResultSetMetaData
Parameters:
column - the column index to be queried.
Returns:
true if the column data is a signed value; else false.
Throws:
java.sql.SQLException - never thrown.

isWritable

public boolean isWritable(int column)
                   throws java.sql.SQLException
Indicates whether it is possible for a write on the column to succeed.

Specified by:
isWritable in interface java.sql.ResultSetMetaData
Parameters:
column - the column index being queried.
Returns:
true if the column is writable; else false.
Throws:
java.sql.SQLException - never thrown.

getAccessPlan

protected int getAccessPlan()
                     throws java.sql.SQLException
Retrieve the server AccessPlan for this prepared statement.

Throws:
java.sql.SQLException - never thrown.

getParamCount

protected int getParamCount()
                     throws java.sql.SQLException
Retrieve the parameter count for this prepared statement.

Throws:
java.sql.SQLException - never thrown.